function lamda = findRadialCorrectionParamL1(pts1,imgSize)
%Pts1 --> points of a straight line (distorted)
%Pts2 --> points of a straight line (not distorted) USELESS for now

x0 = imgSize(2)/2;
y0 = imgSize(1)/2;

N = size(pts1,1);
M = zeros(N,3);
b = zeros(N,1);

for i=1:N
    P1 = [pts1(i,:) 1]; 
    r2 = (pts1(i,1)-x0)^2+(pts1(i,2)-y0)^2;
    %row = [r2 P];
    %row = [P1 P1*r2]; %Ma = b; b --> -r2
    row =  P1;
    M(i,:) = row;
    b(i,:) = r2;
end
L = pinv(transpose(M)*M)*transpose(M)*b;

% [U,S,V] = svd(A);
% L_vector = V(:,4);
% L = L_vector(1:3)'./L_vector(4);

lamda_inv = x0^2+y0^2+L(1)*x0+L(2)*y0+L(3);
lamda = 1/lamda_inv;